<section>
    <div class="content_title">预案列表</div>
    <div class="content_inner">
        <div class="admin_filter_box">
            <form class="form-inline" #logForm>
                <div class="form-group margin_r_20">
                    <label>标题或正文:</label>
                    <input name="keyword" type="text" class="form-control  ipt_input"/>
                </div>
                <button type="submit" (click)="searchByExample($event,logForm)" class="btn btn-primary margin_r_5">搜索
                </button>
                <span class="btn btn-primary pull-right" (click)="addExample()">新增预案</span>
            </form>
        </div>
        <div class="tableBoxJust">
            <table class="table_normal">
                <thead>
                <tr>
                    <td>序号</td>
                    <td>标题</td>
                    <td>创建者</td>
                    <td>创建时间</td>
                    <td>跟新者</td>
                    <td>跟新时间</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody>
                <tr *ngFor="let item of preplanList;let i=index;">
                    <td>{{settings.sortNumber(paginator,i)}}</td>
                    <td>{{item.title}}</td>
                    <td>{{item.creator ? item.creator.realName:''}}</td>
                    <td>{{item.createAt | date: 'yyyy-MM-dd HH:mm'}}</td>
                    <td>{{item.updater ? item.updater.realName:''}}</td>
                    <td>{{item.updateAt | date: 'yyyy-MM-dd HH:mm'}}</td>
                    <td>
                        <span class="btn btn-sm table_btn btn-warning" (click)="deleteExample(item.id)">删除</span>
                        <span class="btn btn-sm table_btn btn-primary" (click)="editExample(item)">编辑</span>
                        <span class="btn btn-sm table_btn btn-info" (click)="detailPreplan(item)">详情</span>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <paginator [(paginator)]="paginator" (pageChange)="pageChanged($event)"></paginator>
</section>
<preplan-edit #edit_preplan (save)="saveEditExample($event)"></preplan-edit>
<preplan-edit #add_preplan (save)="saveAddExample($event)"></preplan-edit>
<confirm #delete_preplan (confirmEvent)="saveDeleteExample($event)"></confirm>
